#ifndef _THREAD_TRACE_H
#define _THREAD_TRACE_H
#include <stdio.h>
#include <stdlib.h>

#define MAXB 10000000  
#define SLAVE_SIZE 2048

// define event_name
#define RTS_event_end "00"
#define RTS_runtime_init "01"
#define RTS_thread_init "02"
#define RTS_begin_split_task "03"
#define RTS_push_addr "04"
#define RTS_register_task "05"
#define RTS_build_releationship "06"
#define RTS_set_vertical_task "07"
#define RTS_add_successor "08"
#define RTS_end_split_task "09"
#define RTS_spawn_task "10"
#define RTS_spawn_and_wait "11"
#define RTS_end_construct_dag "12"
#define RTS_wait_for_all_task "13"
#define RTS_execute_stencil_task "14"
#define RTS_execute_noaffinity_task "15"
#define RTS_execute_blocking_task "16"
#define RTS_execute_composite_task "17"
#define RTS_execute_composite_end_task "18"
#define RTS_execute_undefined_task_1 "19"
#define RTS_execute_undefined_task_2 "20"
#define RTS_undefined_event "21"
#define RTS_execute_task "22"
#define RTS_get_next_task "23"
#define RTS_execute_successor "24"
#define RTS_runtime_shutdown "25"

void trace_print(unsigned long time, char myid, const char event_name[]);

void slave_trace_print(unsigned long time, int myid, const char event_name[]);

void slave_trace_print_final(int myid);

void print_to_file(FILE *f, int num_threads);

#endif
